# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sylpheed
pkgver=3.7.0
pkgrel=7
pkgdesc="Lightweight and user-friendly e-mail client"
url="http://sylpheed.sraoss.jp/en/"
arch="all"
license="GPL-3.0-only"
# TODO: Replace gnupg with specific gnupg subpackages that sylpheed really needs.
depends="pinentry-gtk gnupg"
makedepends="gtk+2.0-dev openldap-dev openssl-dev>3 gpgme-dev"
subpackages="$pkgname-dev $pkgname-lang"
source="https://sylpheed.sraoss.jp/sylpheed/v${pkgver%.*}/sylpheed-$pkgver.tar.gz
	gcc14-fix-ftbfs.patch
	"

prepare() {
	default_prepare
	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-ldap \
		--disable-gtkspell \
		--enable-gpgme
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
1647cea0367fe47ed3447b3a83ca36078234c796a7af5d3bbe94b3d845d8fc3ae86a488610e25e48494fb760056bc39ee15f6a9e13b5b2e06d3f6e9fc1b8c14c  sylpheed-3.7.0.tar.gz
234d3d0b4b3d235220aba33b2aa4052131d9f57b9bfa38828670d6b1c66b04525fd2d59c2a4aeaf7c33cc89479437055428154e05a3fd97641624efadbf98c42  gcc14-fix-ftbfs.patch
"
